Skip to content

Do not pool failed CUDA streams - #2236

Open
fallintoplace wants to merge 1 commit into
NVIDIA:mainfrom
fallintoplace:fix/stream-pool-failed-creation
Open

Do not pool failed CUDA streams#2236
fallintoplace wants to merge 1 commit into
NVIDIA:mainfrom
fallintoplace:fix/stream-pool-failed-creation

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

When CUDA stream creation fails, stream_provider still engages own_stream_ with the null handle. Its destructor then returns that handle to the pool, and a later borrower can receive it with cudaSuccess.

  • Keep own_stream_ disengaged when stream acquisition fails.
  • Add a CUDA API interception regression test in an isolated executable.
  • Avoid returning failed handles to the stream pool.

Tests

  • cmake --build build --target test.nvexec.stream_pool --parallel 4
  • ./build/test/nvexec/test.nvexec.stream_pool
  • cmake --build build --target test.exec test.stdexec --parallel 4
  • ./build/test/test.stdexec
  • ./build/test/exec/test.exec

@copy-pr-bot

copy-pr-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@fallintoplace
fallintoplace force-pushed the fix/stream-pool-failed-creation branch from c71b031 to d8a004c Compare August 26, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant